aboutsummaryrefslogtreecommitdiff
path: root/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-03-07 01:38:04 +0000
committerNadav Rotem <nrotem@apple.com>2013-03-07 01:38:04 +0000
commit55d8f6d49023de5182efbb29d0b3bd0035909d62 (patch)
tree4594652dadedaa836f81b9764e9b4177c0df26a5 /lib/IR/Constants.cpp
parent82e905aae4fe815fc57f50663467cb03e4c9e9e1 (diff)
ArrayRef has a OneElt constructor. Beautify the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Constants.cpp')
-rw-r--r--lib/IR/Constants.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/IR/Constants.cpp b/lib/IR/Constants.cpp
index dafca987fe..e67e78e595 100644
--- a/lib/IR/Constants.cpp
+++ b/lib/IR/Constants.cpp
@@ -1417,8 +1417,7 @@ static inline Constant *getFoldedCast(
LLVMContextImpl *pImpl = Ty->getContext().pImpl;
// Look up the constant in the table first to ensure uniqueness.
- ArrayRef<Constant*> Ops(&C, 1);
- ExprMapKeyType Key(opc, Ops);
+ ExprMapKeyType Key(opc, C);
return pImpl->ExprConstants.getOrCreate(Ty, Key);
}