diff options
| author | Craig Topper <craig.topper@gmail.com> | 2013-07-03 04:30:58 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2013-07-03 04:30:58 +0000 |
| commit | 80170e54adcb7fdf8d094ff913653a06816950de (patch) | |
| tree | 7056edb54ac5bd5ca36cf02f045de073f11785a7 /llvm | |
| parent | afae1fc06c44d9789fa96ee65de5a207e7eb27b3 (diff) | |
| download | bcm5719-llvm-80170e54adcb7fdf8d094ff913653a06816950de.tar.gz bcm5719-llvm-80170e54adcb7fdf8d094ff913653a06816950de.zip | |
Return SmallVectorImpl& instead of SmallVector& in a couple places to avoid having to specify the vector size in multiple places.
llvm-svn: 185507
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/CodeGen/LexicalScopes.h | 14 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/LexicalScopes.cpp | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/llvm/include/llvm/CodeGen/LexicalScopes.h b/llvm/include/llvm/CodeGen/LexicalScopes.h index 72491d310ce..26563a60557 100644 --- a/llvm/include/llvm/CodeGen/LexicalScopes.h +++ b/llvm/include/llvm/CodeGen/LexicalScopes.h @@ -166,13 +166,13 @@ public: virtual ~LexicalScope() {} // Accessors. - LexicalScope *getParent() const { return Parent; } - const MDNode *getDesc() const { return Desc; } - const MDNode *getInlinedAt() const { return InlinedAtLocation; } - const MDNode *getScopeNode() const { return Desc; } - bool isAbstractScope() const { return AbstractScope; } - SmallVector<LexicalScope *, 4> &getChildren() { return Children; } - SmallVector<InsnRange, 4> &getRanges() { return Ranges; } + LexicalScope *getParent() const { return Parent; } + const MDNode *getDesc() const { return Desc; } + const MDNode *getInlinedAt() const { return InlinedAtLocation; } + const MDNode *getScopeNode() const { return Desc; } + bool isAbstractScope() const { return AbstractScope; } + SmallVectorImpl<LexicalScope *> &getChildren() { return Children; } + SmallVectorImpl<InsnRange> &getRanges() { return Ranges; } /// addChild - Add a child scope. void addChild(LexicalScope *S) { Children.push_back(S); } diff --git a/llvm/lib/CodeGen/LexicalScopes.cpp b/llvm/lib/CodeGen/LexicalScopes.cpp index 81721541cd8..6ea0aa4eb51 100644 --- a/llvm/lib/CodeGen/LexicalScopes.cpp +++ b/llvm/lib/CodeGen/LexicalScopes.cpp @@ -218,7 +218,7 @@ void LexicalScopes::constructScopeNest(LexicalScope *Scope) { unsigned Counter = 0; while (!WorkStack.empty()) { LexicalScope *WS = WorkStack.back(); - const SmallVector<LexicalScope *, 4> &Children = WS->getChildren(); + const SmallVectorImpl<LexicalScope *> &Children = WS->getChildren(); bool visitedChildren = false; for (SmallVector<LexicalScope *, 4>::const_iterator SI = Children.begin(), SE = Children.end(); SI != SE; ++SI) { @@ -279,7 +279,7 @@ getMachineBasicBlocks(DebugLoc DL, return; } - SmallVector<InsnRange, 4> &InsnRanges = Scope->getRanges(); + SmallVectorImpl<InsnRange> &InsnRanges = Scope->getRanges(); for (SmallVector<InsnRange, 4>::iterator I = InsnRanges.begin(), E = InsnRanges.end(); I != E; ++I) { InsnRange &R = *I; |

