reimplement Constant::ContainsRelocations as
[oota-llvm.git] / lib / CodeGen / MachineFunction.cpp
index 682b8a7388a71835b1b6cfca48e5c928fbdaead2..9d6669b085261d4302e87b934b448abe14498d74 100644 (file)
@@ -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() {