diff options
| author | Devang Patel <dpatel@apple.com> | 2009-10-06 18:36:08 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2009-10-06 18:36:08 +0000 |
| commit | bbd9fa4b4a0fea47f94ac3eb4eaf5cc8079defe1 (patch) | |
| tree | e5e7cb17543843e953ab3c90a5e9bd13cbf0375f /lib/CodeGen/CGExpr.cpp | |
| parent | 65705d1d76bd4edca324a52eaf27ecb6e6a8151c (diff) | |
| download | clang-bbd9fa4b4a0fea47f94ac3eb4eaf5cc8079defe1.tar.gz clang-bbd9fa4b4a0fea47f94ac3eb4eaf5cc8079defe1.tar.bz2 clang-bbd9fa4b4a0fea47f94ac3eb4eaf5cc8079defe1.tar.xz | |
Add support to attach debug info to an instruction.
This is not yet enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
| -rw-r--r-- | lib/CodeGen/CGExpr.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index d89da3224f..7a124b6d13 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -31,7 +31,11 @@ llvm::AllocaInst *CodeGenFunction::CreateTempAlloca(const llvm::Type *Ty, const char *Name) { if (!Builder.isNamePreserving()) Name = ""; - return new llvm::AllocaInst(Ty, 0, Name, AllocaInsertPt); + llvm::AllocaInst *AI = new llvm::AllocaInst(Ty, 0, Name, AllocaInsertPt); +#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN + Builder.SetDebugLocation(AI); +#endif + return AI; } /// EvaluateExprAsBool - Perform the usual unary conversions on the specified |
