diff options
author | John McCall <rjmccall@apple.com> | 2011-06-24 21:55:10 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-06-24 21:55:10 +0000 |
commit | 23c29fea92a130313bd389f23a696165eae4a36b (patch) | |
tree | eb365d076c07900ff896e24907685ec3fb80dcc0 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 932e5b5d52be4f901bf5370ee6d98349ee209643 (diff) | |
download | bcm5719-llvm-23c29fea92a130313bd389f23a696165eae4a36b.tar.gz bcm5719-llvm-23c29fea92a130313bd389f23a696165eae4a36b.zip |
Change the IR-generation of VLAs so that we capture bounds,
not sizes; so that we use well-typed allocas; and so that we
properly recurse through the full set of variably-modified types.
llvm-svn: 133827
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index af29990da68..ddef39726f7 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -196,6 +196,10 @@ void CodeGenModule::ErrorUnsupported(const Decl *D, const char *Type, getDiags().Report(Context.getFullLoc(D->getLocation()), DiagID) << Msg; } +llvm::ConstantInt *CodeGenModule::getSize(CharUnits size) { + return llvm::ConstantInt::get(SizeTy, size.getQuantity()); +} + void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV, const NamedDecl *D) const { // Internal definitions always have default visibility. |