summaryrefslogtreecommitdiff
path: root/include/llvm/Instructions.h
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2010-07-06 03:53:22 +0000
committerNick Lewycky <nicholas@mxc.ca>2010-07-06 03:53:22 +0000
commitb9933b8f8f218f8a65a66bbd98b38ba96c934ac7 (patch)
tree31361ed6b37d6ac2dfbbdaf92b8806f40796c731 /include/llvm/Instructions.h
parentb3344f87ac7833240a40d87d29115bed5f6b2396 (diff)
downloadllvm-b9933b8f8f218f8a65a66bbd98b38ba96c934ac7.tar.gz
llvm-b9933b8f8f218f8a65a66bbd98b38ba96c934ac7.tar.bz2
llvm-b9933b8f8f218f8a65a66bbd98b38ba96c934ac7.tar.xz
Add default value to setIsNoInline for parity with the other methods of its
kind. Also fold some functions that fit on a line to a single line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107636 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r--include/llvm/Instructions.h22
1 files changed, 7 insertions, 15 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 21cc2eac4e..4dd1516e38 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -993,7 +993,7 @@ public:
/// @brief Return true if the call should not be inlined.
bool isNoInline() const { return paramHasAttr(~0, Attribute::NoInline); }
- void setIsNoInline(bool Value) {
+ void setIsNoInline(bool Value = true) {
if (Value) addAttribute(~0, Attribute::NoInline);
else removeAttribute(~0, Attribute::NoInline);
}
@@ -1017,18 +1017,14 @@ public:
}
/// @brief Determine if the call cannot return.
- bool doesNotReturn() const {
- return paramHasAttr(~0, Attribute::NoReturn);
- }
+ bool doesNotReturn() const { return paramHasAttr(~0, Attribute::NoReturn); }
void setDoesNotReturn(bool DoesNotReturn = true) {
if (DoesNotReturn) addAttribute(~0, Attribute::NoReturn);
else removeAttribute(~0, Attribute::NoReturn);
}
/// @brief Determine if the call cannot unwind.
- bool doesNotThrow() const {
- return paramHasAttr(~0, Attribute::NoUnwind);
- }
+ bool doesNotThrow() const { return paramHasAttr(~0, Attribute::NoUnwind); }
void setDoesNotThrow(bool DoesNotThrow = true) {
if (DoesNotThrow) addAttribute(~0, Attribute::NoUnwind);
else removeAttribute(~0, Attribute::NoUnwind);
@@ -2488,11 +2484,11 @@ public:
/// @brief Return true if the call should not be inlined.
bool isNoInline() const { return paramHasAttr(~0, Attribute::NoInline); }
- void setIsNoInline(bool Value) {
+ void setIsNoInline(bool Value = true) {
if (Value) addAttribute(~0, Attribute::NoInline);
else removeAttribute(~0, Attribute::NoInline);
}
-
+
/// @brief Determine if the call does not access memory.
bool doesNotAccessMemory() const {
return paramHasAttr(~0, Attribute::ReadNone);
@@ -2512,18 +2508,14 @@ public:
}
/// @brief Determine if the call cannot return.
- bool doesNotReturn() const {
- return paramHasAttr(~0, Attribute::NoReturn);
- }
+ bool doesNotReturn() const { return paramHasAttr(~0, Attribute::NoReturn); }
void setDoesNotReturn(bool DoesNotReturn = true) {
if (DoesNotReturn) addAttribute(~0, Attribute::NoReturn);
else removeAttribute(~0, Attribute::NoReturn);
}
/// @brief Determine if the call cannot unwind.
- bool doesNotThrow() const {
- return paramHasAttr(~0, Attribute::NoUnwind);
- }
+ bool doesNotThrow() const { return paramHasAttr(~0, Attribute::NoUnwind); }
void setDoesNotThrow(bool DoesNotThrow = true) {
if (DoesNotThrow) addAttribute(~0, Attribute::NoUnwind);
else removeAttribute(~0, Attribute::NoUnwind);