adjust for llvm api changes.

llvm-svn: 92236
This commit is contained in:
Chris Lattner 2009-12-28 23:41:39 +00:00
parent 2f2aa2b067
commit 9f021fd05d
1 changed files with 2 additions and 10 deletions

View File

@ -26,7 +26,6 @@
#include "llvm/DerivedTypes.h"
#include "llvm/Instructions.h"
#include "llvm/Intrinsics.h"
#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/SmallVector.h"
@ -1219,10 +1218,7 @@ void CGDebugInfo::EmitDeclare(const VarDecl *Decl, unsigned Tag,
llvm::DILocation DO(NULL);
llvm::DILocation DL = DebugFactory.CreateLocation(Line, Column, DS, DO);
// TODO: Remove #include of LLVMContext from this.
llvm::LLVMContext &Context = Call->getContext();
unsigned DbgMDKind = Context.getMetadata().getMDKindID("dbg");
Context.getMetadata().addMD(DbgMDKind, DL.getNode(), Call);
Call->setMetadata("dbg", DL.getNode());
}
/// EmitDeclare - Emit local variable declaration debug info.
@ -1424,11 +1420,7 @@ void CGDebugInfo::EmitDeclare(const BlockDeclRefExpr *BDRE, unsigned Tag,
llvm::DILocation DL =
DebugFactory.CreateLocation(Line, PLoc.getColumn(), DS, DO);
// TODO: Remove #include of LLVMContext from this.
llvm::LLVMContext &Context = Call->getContext();
unsigned DbgMDKind = Context.getMetadata().getMDKindID("dbg");
Context.getMetadata().addMD(DbgMDKind, DL.getNode(), Call);
Call->setMetadata("dbg", DL.getNode());
}
void CGDebugInfo::EmitDeclareOfAutoVariable(const VarDecl *Decl,