[llvm] r192214 - Move DIRef::getName out of line.
Manman Ren
manman.ren at gmail.com
Tue Oct 8 11:42:03 PDT 2013
Author: mren
Date: Tue Oct 8 13:42:03 2013
New Revision: 192214
URL: http://llvm.org/viewvc/llvm-project?rev=192214&view=rev
Log:
Move DIRef::getName out of line.
Modified:
llvm/trunk/include/llvm/DebugInfo.h
Modified: llvm/trunk/include/llvm/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo.h?rev=192214&r1=192213&r2=192214&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/DebugInfo.h Tue Oct 8 13:42:03 2013
@@ -230,16 +230,7 @@ template <typename T> class DIRef {
public:
T resolve(const DITypeIdentifierMap &Map) const;
- StringRef getName() const {
- if (!Val)
- return StringRef();
-
- if (const MDNode *MD = dyn_cast<MDNode>(Val))
- return T(MD).getName();
-
- const MDString *MS = cast<MDString>(Val);
- return MS->getString();
- }
+ StringRef getName() const;
operator Value *() const { return const_cast<Value *>(Val); }
};
@@ -260,6 +251,18 @@ T DIRef<T>::resolve(const DITypeIdentifi
return T(Iter->second);
}
+template <typename T>
+StringRef DIRef<T>::getName() const {
+ if (!Val)
+ return StringRef();
+
+ if (const MDNode *MD = dyn_cast<MDNode>(Val))
+ return T(MD).getName();
+
+ const MDString *MS = cast<MDString>(Val);
+ return MS->getString();
+}
+
/// Specialize getFieldAs to handle fields that are references to DIScopes.
template <> DIScopeRef DIDescriptor::getFieldAs<DIScopeRef>(unsigned Elt) const;
/// Specialize DIRef constructor for DIScopeRef.
More information about the llvm-commits
mailing list