aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGVTables.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-10-25 10:18:50 +0000
committerAlexey Samsonov <samsonov@google.com>2012-10-25 10:18:50 +0000
commit34b41f80aad3679c545a4ba9bca9c1a318d41844 (patch)
tree08aa80f7049b2162799a8dbaa4436351fbf67208 /lib/CodeGen/CGVTables.cpp
parentd9a2d5bdb747836917c2a5f7e12d075ec6762c77 (diff)
Initialize debug info for special cases of functions that lack declarations and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166676 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVTables.cpp')
-rw-r--r--lib/CodeGen/CGVTables.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGVTables.cpp b/lib/CodeGen/CGVTables.cpp
index a1a661be84..5b37fe4b96 100644
--- a/lib/CodeGen/CGVTables.cpp
+++ b/lib/CodeGen/CGVTables.cpp
@@ -333,7 +333,10 @@ void CodeGenFunction::GenerateThunk(llvm::Function *Fn,
FunctionArgs.push_back(Param);
}
-
+
+ // Initialize debug info if needed.
+ maybeInitializeDebugInfo();
+
StartFunction(GlobalDecl(), ResultType, Fn, FnInfo, FunctionArgs,
SourceLocation());