mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
Pass DIEnumerator APInt args by const reference not value.
Noticed by clang-tidy performance-unnecessary-value-param warning.
This commit is contained in:
parent
91403d8b4a
commit
7783603535
@ -359,7 +359,7 @@ class DIEnumerator : public DINode {
|
||||
friend class MDNode;
|
||||
|
||||
APInt Value;
|
||||
DIEnumerator(LLVMContext &C, StorageType Storage, APInt Value,
|
||||
DIEnumerator(LLVMContext &C, StorageType Storage, const APInt &Value,
|
||||
bool IsUnsigned, ArrayRef<Metadata *> Ops)
|
||||
: DINode(C, DIEnumeratorKind, Storage, dwarf::DW_TAG_enumerator, Ops),
|
||||
Value(Value) {
|
||||
@ -371,13 +371,13 @@ class DIEnumerator : public DINode {
|
||||
Ops) {}
|
||||
~DIEnumerator() = default;
|
||||
|
||||
static DIEnumerator *getImpl(LLVMContext &Context, APInt Value,
|
||||
static DIEnumerator *getImpl(LLVMContext &Context, const APInt &Value,
|
||||
bool IsUnsigned, StringRef Name,
|
||||
StorageType Storage, bool ShouldCreate = true) {
|
||||
return getImpl(Context, Value, IsUnsigned,
|
||||
getCanonicalMDString(Context, Name), Storage, ShouldCreate);
|
||||
}
|
||||
static DIEnumerator *getImpl(LLVMContext &Context, APInt Value,
|
||||
static DIEnumerator *getImpl(LLVMContext &Context, const APInt &Value,
|
||||
bool IsUnsigned, MDString *Name,
|
||||
StorageType Storage, bool ShouldCreate = true);
|
||||
|
||||
|
@ -435,7 +435,7 @@ DISubrange::BoundType DISubrange::getStride() const {
|
||||
return BoundType();
|
||||
}
|
||||
|
||||
DIEnumerator *DIEnumerator::getImpl(LLVMContext &Context, APInt Value,
|
||||
DIEnumerator *DIEnumerator::getImpl(LLVMContext &Context, const APInt &Value,
|
||||
bool IsUnsigned, MDString *Name,
|
||||
StorageType Storage, bool ShouldCreate) {
|
||||
assert(isCanonical(Name) && "Expected canonical MDString");
|
||||
|
Loading…
Reference in New Issue
Block a user