diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-04-21 19:59:12 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-04-21 19:59:12 +0000 |
commit | ea324f154b050ba5cb8bc25de77ba185ea81d8d7 (patch) | |
tree | 20e6048f3ae8fb6169df7079938cc4d8c078fb06 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 70597d4e5012bc63146847e688dec61d5abfae7f (diff) | |
download | bcm5719-llvm-ea324f154b050ba5cb8bc25de77ba185ea81d8d7.tar.gz bcm5719-llvm-ea324f154b050ba5cb8bc25de77ba185ea81d8d7.zip |
PR9214: Convert Metadata API to use ArrayRef.
llvm-svn: 129929
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 39faee74bcf..603e8c196b3 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -2160,7 +2160,7 @@ static void EmitGlobalDeclMetadata(CodeGenModule &CGM, Addr, GetPointerConstant(CGM.getLLVMContext(), D.getDecl()) }; - GlobalMetadata->addOperand(llvm::MDNode::get(CGM.getLLVMContext(), Ops, 2)); + GlobalMetadata->addOperand(llvm::MDNode::get(CGM.getLLVMContext(), Ops)); } /// Emits metadata nodes associating all the global values in the @@ -2201,7 +2201,7 @@ void CodeGenFunction::EmitDeclMetadata() { if (llvm::AllocaInst *Alloca = dyn_cast<llvm::AllocaInst>(Addr)) { llvm::Value *DAddr = GetPointerConstant(getLLVMContext(), D); - Alloca->setMetadata(DeclPtrKind, llvm::MDNode::get(Context, &DAddr, 1)); + Alloca->setMetadata(DeclPtrKind, llvm::MDNode::get(Context, DAddr)); } else if (llvm::GlobalValue *GV = dyn_cast<llvm::GlobalValue>(Addr)) { GlobalDecl GD = GlobalDecl(cast<VarDecl>(D)); EmitGlobalDeclMetadata(CGM, GlobalMetadata, GD, GV); |