projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
And now we can call the other 'get' method from this one and not duplicate the code.
[oota-llvm.git]
/
include
/
llvm
/
Function.h
diff --git
a/include/llvm/Function.h
b/include/llvm/Function.h
index f28aa5cdd7a7b0a0831486b87541d5fdda94a2d1..e211e9ab52a871b7ba9a8e29c037beeec614143b 100644
(file)
--- a/
include/llvm/Function.h
+++ b/
include/llvm/Function.h
@@
-178,9
+178,7
@@
public:
///
void addFnAttr(Attributes::AttrVal N) {
// Function Attributes are stored at ~0 index
///
void addFnAttr(Attributes::AttrVal N) {
// Function Attributes are stored at ~0 index
- Attributes::Builder B;
- B.addAttribute(N);
- addAttribute(~0U, Attributes::get(B));
+ addAttribute(AttrListPtr::FunctionIndex, Attributes::get(getContext(), N));
}
/// removeFnAttr - Remove function attributes from this function.
}
/// removeFnAttr - Remove function attributes from this function.
@@
-278,9
+276,7
@@
public:
return getParamAttributes(n).hasAttribute(Attributes::NoAlias);
}
void setDoesNotAlias(unsigned n) {
return getParamAttributes(n).hasAttribute(Attributes::NoAlias);
}
void setDoesNotAlias(unsigned n) {
- Attributes::Builder B;
- B.addAttribute(Attributes::NoAlias);
- addAttribute(n, Attributes::get(B));
+ addAttribute(n, Attributes::get(getContext(), Attributes::NoAlias));
}
/// @brief Determine if the parameter can be captured.
}
/// @brief Determine if the parameter can be captured.
@@
-289,9
+285,7
@@
public:
return getParamAttributes(n).hasAttribute(Attributes::NoCapture);
}
void setDoesNotCapture(unsigned n) {
return getParamAttributes(n).hasAttribute(Attributes::NoCapture);
}
void setDoesNotCapture(unsigned n) {
- Attributes::Builder B;
- B.addAttribute(Attributes::NoCapture);
- addAttribute(n, Attributes::get(B));
+ addAttribute(n, Attributes::get(getContext(), Attributes::NoCapture));
}
/// copyAttributesFrom - copy all additional attributes (those not needed to
}
/// copyAttributesFrom - copy all additional attributes (those not needed to