aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Reader/ReaderInternals.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-19 06:01:12 +0000
committerChris Lattner <sabre@nondot.org>2003-11-19 06:01:12 +0000
commit1c3673b238c8b016ee1137e39a44e06807e8ec44 (patch)
tree41fd21b019ccf2961cd8dd04cc49b8b2a905c733 /lib/Bytecode/Reader/ReaderInternals.h
parentcc33d70a92866e615a0e1d5b97d9cd3e90e99115 (diff)
Minor speedup to do less linear time searches of information we already have.
speeds up disassembly of kc++ by .6s git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10079 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Reader/ReaderInternals.h')
-rw-r--r--lib/Bytecode/Reader/ReaderInternals.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Bytecode/Reader/ReaderInternals.h b/lib/Bytecode/Reader/ReaderInternals.h
index 53f699e6d0..8522aee4c2 100644
--- a/lib/Bytecode/Reader/ReaderInternals.h
+++ b/lib/Bytecode/Reader/ReaderInternals.h
@@ -180,7 +180,10 @@ private:
Value *getValue(unsigned TypeID, unsigned num, bool Create = true);
const Type *getType(unsigned ID);
BasicBlock *getBasicBlock(unsigned ID);
- Constant *getConstantValue(const Type *Ty, unsigned num);
+ Constant *getConstantValue(unsigned TypeID, unsigned num);
+ Constant *getConstantValue(const Type *Ty, unsigned num) {
+ return getConstantValue(getTypeSlot(Ty), num);
+ }
unsigned insertValue(Value *V, ValueTable &Table);
unsigned insertValue(Value *V, unsigned Type, ValueTable &Table);