aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-22 00:05:44 +0000
committerChris Lattner <sabre@nondot.org>2009-07-22 00:05:44 +0000
commit4565ef5b65b7d0b778b41836d70b806196cc8e24 (patch)
tree6938ad8daf6bcadd6914dcc163a1ebb7ac57d678 /llvm/lib/CodeGen/MachineFunction.cpp
parent71dfd782ce8b4523ae1200011074d1cea02978bd (diff)
downloadllvm-4565ef5b65b7d0b778b41836d70b806196cc8e24.zip
llvm-4565ef5b65b7d0b778b41836d70b806196cc8e24.tar.gz
llvm-4565ef5b65b7d0b778b41836d70b806196cc8e24.tar.bz2
reimplement Constant::ContainsRelocations as
Constant::getRelocationInfo(), which has a much simpler to use API. It still should not be part of libvmcore, but is better than it was. Also teach it to be smart about hidden visibility. llvm-svn: 76700
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 682b8a7..9d6669b 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -547,19 +547,7 @@ const Type *MachineConstantPoolEntry::getType() const {
unsigned MachineConstantPoolEntry::getRelocationInfo() const {
if (isMachineConstantPoolEntry())
return Val.MachineCPVal->getRelocationInfo();
-
- // FIXME: This API sucks.
-
- // If no relocations, return 0.
- if (!Val.ConstVal->ContainsRelocations())
- return 0;
-
- // If it contains no global relocations, return 1.
- if (!Val.ConstVal->ContainsRelocations(Reloc::Global))
- return 1;
-
- // Otherwise, it has general relocations.
- return 2;
+ return Val.ConstVal->getRelocationInfo();
}
MachineConstantPool::~MachineConstantPool() {