diff options
| author | Jay Foad <jay.foad@gmail.com> | 2010-12-07 08:25:34 +0000 |
|---|---|---|
| committer | Jay Foad <jay.foad@gmail.com> | 2010-12-07 08:25:34 +0000 |
| commit | 6d4db0c8850543661493af107a1d601d12a89509 (patch) | |
| tree | 8d09f8cde8e18587dc50e42150992071c57f9e43 /clang/lib/AST/ASTContext.cpp | |
| parent | 583abbc4df3d9b9e5a86a56ae581970b98dc5249 (diff) | |
| download | bcm5719-llvm-6d4db0c8850543661493af107a1d601d12a89509.tar.gz bcm5719-llvm-6d4db0c8850543661493af107a1d601d12a89509.zip | |
PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.
llvm-svn: 121121
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 9a8b153e26f..d7dedc61697 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -1422,7 +1422,8 @@ QualType ASTContext::getConstantArrayType(QualType EltTy, // Convert the array size into a canonical width matching the pointer size for // the target. llvm::APInt ArySize(ArySizeIn); - ArySize.zextOrTrunc(Target.getPointerWidth(EltTy.getAddressSpace())); + ArySize = + ArySize.zextOrTrunc(Target.getPointerWidth(EltTy.getAddressSpace())); llvm::FoldingSetNodeID ID; ConstantArrayType::Profile(ID, EltTy, ArySize, ASM, EltTypeQuals); |

