From: Dan Gohman Date: Fri, 7 May 2010 15:36:10 +0000 (+0000) Subject: Const-ify some stuff. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5374195cd74b481681f41d5e1b03e5ba69c9dad0;p=oota-llvm.git Const-ify some stuff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103256 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h index 9a465b0eec5..f292650991e 100644 --- a/include/llvm/Analysis/DebugInfo.h +++ b/include/llvm/Analysis/DebugInfo.h @@ -788,20 +788,20 @@ namespace llvm { bool addType(DIType DT); public: - typedef SmallVector::iterator iterator; - iterator compile_unit_begin() { return CUs.begin(); } - iterator compile_unit_end() { return CUs.end(); } - iterator subprogram_begin() { return SPs.begin(); } - iterator subprogram_end() { return SPs.end(); } - iterator global_variable_begin() { return GVs.begin(); } - iterator global_variable_end() { return GVs.end(); } - iterator type_begin() { return TYs.begin(); } - iterator type_end() { return TYs.end(); } - - unsigned compile_unit_count() { return CUs.size(); } - unsigned global_variable_count() { return GVs.size(); } - unsigned subprogram_count() { return SPs.size(); } - unsigned type_count() { return TYs.size(); } + typedef SmallVector::const_iterator iterator; + iterator compile_unit_begin() const { return CUs.begin(); } + iterator compile_unit_end() const { return CUs.end(); } + iterator subprogram_begin() const { return SPs.begin(); } + iterator subprogram_end() const { return SPs.end(); } + iterator global_variable_begin() const { return GVs.begin(); } + iterator global_variable_end() const { return GVs.end(); } + iterator type_begin() const { return TYs.begin(); } + iterator type_end() const { return TYs.end(); } + + unsigned compile_unit_count() const { return CUs.size(); } + unsigned global_variable_count() const { return GVs.size(); } + unsigned subprogram_count() const { return SPs.size(); } + unsigned type_count() const { return TYs.size(); } private: SmallVector CUs; // Compile Units