aboutsummaryrefslogtreecommitdiffstats
path: root/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
commitbdb23b3806e83737a67a023a729547caf03fc533 (patch)
tree9eaf5648fd1b7eb369792e52af192cbf59dbdb0e /lib/CodeGen/MachineFunction.cpp
parent67fa48e612ec949ec3504e7903a4d09360d27a3d (diff)
downloadexternal_llvm-bdb23b3806e83737a67a023a729547caf03fc533.tar.gz
external_llvm-bdb23b3806e83737a67a023a729547caf03fc533.tar.bz2
external_llvm-bdb23b3806e83737a67a023a729547caf03fc533.zip
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76700 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
-rw-r--r--lib/CodeGen/MachineFunction.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp
index 682b8a7388..9d6669b085 100644
--- a/lib/CodeGen/MachineFunction.cpp
+++ b/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() {