From 6f141659cab11109d9931d92d0988f8850778de3 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Thu, 21 Apr 2011 19:59:12 +0000 Subject: PR9214: Convert Metadata API to use ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129929 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/CodeGenModule.cpp') diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 39faee74bc..603e8c196b 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/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(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(Addr)) { GlobalDecl GD = GlobalDecl(cast(D)); EmitGlobalDeclMetadata(CGM, GlobalMetadata, GD, GV); -- cgit v1.2.3-70-g09d2