diff options
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 |
