summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen')
-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 682b8a7388a..9d6669b0852 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() {
OpenPOWER on IntegriCloud