aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Jeffords <blunted2night@gmail.com>2010-05-12 00:52:54 +0000
committerNathan Jeffords <blunted2night@gmail.com>2010-05-12 00:52:54 +0000
commit624d466a671feb563c137d1216ecad9d03d1a2ed (patch)
treeed1afc841d5f25254f82423533c146858145a185
parenta5f1d57f65ae601ec181c0f4e36cf0df5e8d79d8 (diff)
Added a trivial function to modify the flags field of MCSymbolData class. The function takes the value and a mask, and clears the mask bits before applying the value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103534 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/MC/MCAssembler.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h
index 11b1bfcb20..08500f8d7a 100644
--- a/include/llvm/MC/MCAssembler.h
+++ b/include/llvm/MC/MCAssembler.h
@@ -571,6 +571,11 @@ public:
/// setFlags - Set the (implementation defined) symbol flags.
void setFlags(uint32_t Value) { Flags = Value; }
+ /// modifyFlags - Modify the flags via a mask
+ void modifyFlags(uint32_t Value, uint32_t Mask) {
+ Flags = (Flags & ~Mask) | Value;
+ }
+
/// getIndex - Get the (implementation defined) index.
uint64_t getIndex() const { return Index; }