From 99e05cf163f14ecc70ef68e550ddb568a075e64b Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 13 May 2014 18:45:48 +0000 Subject: Split GlobalValue into GlobalValue and GlobalObject. This allows code to statically accept a Function or a GlobalVariable, but not an alias. This is already a cleanup by itself IMHO, but the main reason for it is that it gives a lot more confidence that the refactoring to fix the design of GlobalAlias is correct. That will be a followup patch. llvm-svn: 208716 --- llvm/lib/IR/Core.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/IR/Core.cpp') diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp index e5b98b89db6..e3a445800c7 100644 --- a/llvm/lib/IR/Core.cpp +++ b/llvm/lib/IR/Core.cpp @@ -1307,7 +1307,7 @@ const char *LLVMGetSection(LLVMValueRef Global) { } void LLVMSetSection(LLVMValueRef Global, const char *Section) { - unwrap(Global)->setSection(Section); + unwrap(Global)->setSection(Section); } LLVMVisibility LLVMGetVisibility(LLVMValueRef Global) { @@ -1357,7 +1357,7 @@ unsigned LLVMGetAlignment(LLVMValueRef V) { void LLVMSetAlignment(LLVMValueRef V, unsigned Bytes) { Value *P = unwrap(V); - if (GlobalValue *GV = dyn_cast(P)) + if (GlobalObject *GV = dyn_cast(P)) GV->setAlignment(Bytes); else if (AllocaInst *AI = dyn_cast(P)) AI->setAlignment(Bytes); -- cgit v1.2.3