[lld] r192249 - Use size_t for array index.
Rui Ueyama
ruiu at google.com
Tue Oct 8 16:01:50 PDT 2013
Author: ruiu
Date: Tue Oct 8 18:01:49 2013
New Revision: 192249
URL: http://llvm.org/viewvc/llvm-project?rev=192249&view=rev
Log:
Use size_t for array index.
Modified:
lld/trunk/include/lld/Driver/InputGraph.h
lld/trunk/lib/Driver/InputGraph.cpp
Modified: lld/trunk/include/lld/Driver/InputGraph.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/InputGraph.h?rev=192249&r1=192248&r2=192249&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/InputGraph.h (original)
+++ lld/trunk/include/lld/Driver/InputGraph.h Tue Oct 8 18:01:49 2013
@@ -92,17 +92,17 @@ public:
/// \brief Dump the input Graph
virtual bool dump(raw_ostream &diagnostics = llvm::errs());
- InputElement &operator[](uint32_t index) const {
+ InputElement &operator[](size_t index) const {
return (*_inputArgs[index]);
}
/// \brief Insert a vector of elements into the input graph at position.
virtual void insertElementsAt(std::vector<std::unique_ptr<InputElement> >,
- Position position, int32_t pos = 0);
+ Position position, size_t pos = 0);
/// \brief Insert an element into the input graph at position.
virtual void insertOneElementAt(std::unique_ptr<InputElement>,
- Position position, int32_t pos = 0);
+ Position position, size_t pos = 0);
/// \brief Helper functions for the resolver
virtual ErrorOr<InputElement *> getNextInputElement();
Modified: lld/trunk/lib/Driver/InputGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/InputGraph.cpp?rev=192249&r1=192248&r2=192249&view=diff
==============================================================================
--- lld/trunk/lib/Driver/InputGraph.cpp (original)
+++ lld/trunk/lib/Driver/InputGraph.cpp Tue Oct 8 18:01:49 2013
@@ -55,7 +55,7 @@ bool InputGraph::dump(raw_ostream &diagn
void InputGraph::insertElementsAt(
std::vector<std::unique_ptr<InputElement> > inputElements,
- Position position, int32_t pos) {
+ Position position, size_t pos) {
if (position == InputGraph::Position::BEGIN)
pos = 0;
else if (position == InputGraph::Position::END)
@@ -66,7 +66,7 @@ void InputGraph::insertElementsAt(
}
void InputGraph::insertOneElementAt(std::unique_ptr<InputElement> element,
- Position position, int32_t pos) {
+ Position position, size_t pos) {
if (position == InputGraph::Position::BEGIN)
pos = 0;
else if (position == InputGraph::Position::END)
More information about the llvm-commits
mailing list