OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27b1252
)
ArrayRef: use std::vector::data() now that we are building in C++11 mode
author
Dmitri Gribenko
<gribozavr@gmail.com>
Thu, 3 Apr 2014 16:29:11 +0000
(16:29 +0000)
committer
Dmitri Gribenko
<gribozavr@gmail.com>
Thu, 3 Apr 2014 16:29:11 +0000
(16:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205542
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/ArrayRef.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/ArrayRef.h
b/include/llvm/ADT/ArrayRef.h
index
c95889a
..
fcf280d
100644
(file)
--- a/
include/llvm/ADT/ArrayRef.h
+++ b/
include/llvm/ADT/ArrayRef.h
@@
-77,7
+77,7
@@
namespace llvm {
/// Construct an ArrayRef from a std::vector.
template<typename A>
/*implicit*/ ArrayRef(const std::vector<T, A> &Vec)
- : Data(Vec.
empty() ? (T*)0 : &Vec[0]
), Length(Vec.size()) {}
+ : Data(Vec.
data()
), Length(Vec.size()) {}
/// Construct an ArrayRef from a C array.
template <size_t N>