summaryrefslogtreecommitdiff
path: root/include/llvm/IR/GlobalVariable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/IR/GlobalVariable.h')
-rw-r--r--include/llvm/IR/GlobalVariable.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/llvm/IR/GlobalVariable.h b/include/llvm/IR/GlobalVariable.h
index 3f5d00bd3b3ac..454492769c8b8 100644
--- a/include/llvm/IR/GlobalVariable.h
+++ b/include/llvm/IR/GlobalVariable.h
@@ -23,8 +23,8 @@
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/Twine.h"
#include "llvm/ADT/ilist_node.h"
-#include "llvm/IR/GlobalObject.h"
#include "llvm/IR/Attributes.h"
+#include "llvm/IR/GlobalObject.h"
#include "llvm/IR/OperandTraits.h"
#include "llvm/IR/Value.h"
#include <cassert>
@@ -235,6 +235,13 @@ public:
Attrs = A;
}
+ /// Check if section name is present
+ bool hasImplicitSection() const {
+ return getAttributes().hasAttribute("bss-section") ||
+ getAttributes().hasAttribute("data-section") ||
+ getAttributes().hasAttribute("rodata-section");
+ }
+
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const Value *V) {
return V->getValueID() == Value::GlobalVariableVal;