summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-07 03:33:57 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-07 03:33:57 +0000
commita1384912b212bc743f95a7240ebe9bdce339c952 (patch)
tree4eb95a6539fffbe8871669b00c61a59148e337a7
parent0e46755821adab8f8850a6af03c8106e472f74f1 (diff)
downloadbcm5719-llvm-a1384912b212bc743f95a7240ebe9bdce339c952.tar.gz
bcm5719-llvm-a1384912b212bc743f95a7240ebe9bdce339c952.zip
DebugInfo: Move DISubprogram::is*() queries to MDSubprogram
Move body of `DISubprogram::isPrivate()` (etc.) to `MDSubprogram`, and change the versions in `DISubprogram` to forward there. This is just like r234275, but for subprograms instead of types. llvm-svn: 234282
-rw-r--r--llvm/include/llvm/IR/DebugInfo.h41
-rw-r--r--llvm/include/llvm/IR/DebugInfoMetadata.h29
2 files changed, 37 insertions, 33 deletions
diff --git a/llvm/include/llvm/IR/DebugInfo.h b/llvm/include/llvm/IR/DebugInfo.h
index f1827858da1..e4fc73eddc6 100644
--- a/llvm/include/llvm/IR/DebugInfo.h
+++ b/llvm/include/llvm/IR/DebugInfo.h
@@ -621,39 +621,14 @@ public:
MDNode *getVariablesNodes() const { return getVariables(); }
DIArray getVariables() const { return DIArray(get()->getVariables()); }
- unsigned isArtificial() const { return (getFlags() & FlagArtificial) != 0; }
- /// \brief Check for the "private" access specifier.
- bool isPrivate() const {
- return (getFlags() & FlagAccessibility) == FlagPrivate;
- }
- /// \brief Check for the "protected" access specifier.
- bool isProtected() const {
- return (getFlags() & FlagAccessibility) == FlagProtected;
- }
- /// \brief Check for the "public" access specifier.
- bool isPublic() const {
- return (getFlags() & FlagAccessibility) == FlagPublic;
- }
- /// \brief Check for "explicit".
- bool isExplicit() const { return (getFlags() & FlagExplicit) != 0; }
- /// \brief Check if this is prototyped.
- bool isPrototyped() const { return (getFlags() & FlagPrototyped) != 0; }
-
- /// \brief Check if this is reference-qualified.
- ///
- /// Return true if this subprogram is a C++11 reference-qualified non-static
- /// member function (void foo() &).
- unsigned isLValueReference() const {
- return (getFlags() & FlagLValueReference) != 0;
- }
-
- /// \brief Check if this is rvalue-reference-qualified.
- ///
- /// Return true if this subprogram is a C++11 rvalue-reference-qualified
- /// non-static member function (void foo() &&).
- unsigned isRValueReference() const {
- return (getFlags() & FlagRValueReference) != 0;
- }
+ unsigned isArtificial() const { return get()->isArtificial(); }
+ bool isPrivate() const { return get()->isPrivate(); }
+ bool isProtected() const { return get()->isProtected(); }
+ bool isPublic() const { return get()->isPublic(); }
+ bool isExplicit() const { return get()->isExplicit(); }
+ bool isPrototyped() const { return get()->isPrototyped(); }
+ unsigned isLValueReference() const { return get()->isLValueReference(); }
+ unsigned isRValueReference() const { return get()->isRValueReference(); }
};
/// \brief This is a wrapper for a lexical block.
diff --git a/llvm/include/llvm/IR/DebugInfoMetadata.h b/llvm/include/llvm/IR/DebugInfoMetadata.h
index 9cf84afea75..79f30446922 100644
--- a/llvm/include/llvm/IR/DebugInfoMetadata.h
+++ b/llvm/include/llvm/IR/DebugInfoMetadata.h
@@ -1236,6 +1236,35 @@ public:
bool isDefinition() const { return IsDefinition; }
bool isOptimized() const { return IsOptimized; }
+ unsigned isArtificial() const { return getFlags() & FlagArtificial; }
+ bool isPrivate() const {
+ return (getFlags() & FlagAccessibility) == FlagPrivate;
+ }
+ bool isProtected() const {
+ return (getFlags() & FlagAccessibility) == FlagProtected;
+ }
+ bool isPublic() const {
+ return (getFlags() & FlagAccessibility) == FlagPublic;
+ }
+ bool isExplicit() const { return getFlags() & FlagExplicit; }
+ bool isPrototyped() const { return getFlags() & FlagPrototyped; }
+
+ /// \brief Check if this is reference-qualified.
+ ///
+ /// Return true if this subprogram is a C++11 reference-qualified non-static
+ /// member function (void foo() &).
+ unsigned isLValueReference() const {
+ return getFlags() & FlagLValueReference;
+ }
+
+ /// \brief Check if this is rvalue-reference-qualified.
+ ///
+ /// Return true if this subprogram is a C++11 rvalue-reference-qualified
+ /// non-static member function (void foo() &&).
+ unsigned isRValueReference() const {
+ return getFlags() & FlagRValueReference;
+ }
+
MDScopeRef getScope() const { return MDScopeRef(getRawScope()); }
StringRef getName() const { return getStringOperand(2); }
OpenPOWER on IntegriCloud