[llvm] r234287 - DebugInfo: Move DIFlag accessors from DIVariable to MDLocalVariable

Duncan P. N. Exon Smith dexonsmith at apple.com
Mon Apr 6 20:55:30 PDT 2015


Author: dexonsmith
Date: Mon Apr  6 22:55:30 2015
New Revision: 234287

URL: http://llvm.org/viewvc/llvm-project?rev=234287&view=rev
Log:
DebugInfo: Move DIFlag accessors from DIVariable to MDLocalVariable

Modified:
    llvm/trunk/include/llvm/IR/DebugInfo.h
    llvm/trunk/include/llvm/IR/DebugInfoMetadata.h

Modified: llvm/trunk/include/llvm/IR/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=234287&r1=234286&r2=234287&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfo.h Mon Apr  6 22:55:30 2015
@@ -812,14 +812,8 @@ public:
   DIFile getFile() const { return DIFile(get()->getFile()); }
   DITypeRef getType() const { return DITypeRef::get(get()->getType()); }
 
-  /// \brief Return true if this variable is marked as "artificial".
-  bool isArtificial() const {
-    return (getFlags() & FlagArtificial) != 0;
-  }
-
-  bool isObjectPointer() const {
-    return (getFlags() & FlagObjectPointer) != 0;
-  }
+  bool isArtificial() const { return get()->isArtificial(); }
+  bool isObjectPointer() const { return get()->isObjectPointer(); }
 
   /// \brief If this variable is inlined then return inline location.
   MDNode *getInlinedAt() const { return DIDescriptor(get()->getInlinedAt()); }

Modified: llvm/trunk/include/llvm/IR/DebugInfoMetadata.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfoMetadata.h?rev=234287&r1=234286&r2=234287&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfoMetadata.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfoMetadata.h Mon Apr  6 22:55:30 2015
@@ -1769,6 +1769,9 @@ public:
 
   Metadata *getRawInlinedAt() const { return getOperand(4); }
 
+  bool isArtificial() const { return getFlags() & FlagArtificial; }
+  bool isObjectPointer() const { return getFlags() & FlagObjectPointer; }
+
   /// \brief Check that a location is valid for this variable.
   ///
   /// Check that \c DL has the same inlined-at location as this variable,





More information about the llvm-commits mailing list