Mercurial > projects > ldc
comparison gen/main.cpp @ 1546:f9660d9cf2ba
Temporarily force our LLVMContext to the global context
From llvm r75846:
"To simplify the upcoming context-on-type change, switch all command
line tools to using the default global context for now."
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Mon, 20 Jul 2009 17:55:05 +0200 |
parents | 8863cf7236e6 |
children | 08c8ef491c97 |
comparison
equal
deleted
inserted
replaced
1545:7fcb72d518f6 | 1546:f9660d9cf2ba |
---|---|
400 else if ((m32bits || m64bits) && (!mArch.empty() || !mTargetTriple.empty())) | 400 else if ((m32bits || m64bits) && (!mArch.empty() || !mTargetTriple.empty())) |
401 error("-m32 and -m64 switches cannot be used together with -march and -mtriple switches"); | 401 error("-m32 and -m64 switches cannot be used together with -march and -mtriple switches"); |
402 if (global.errors) | 402 if (global.errors) |
403 fatal(); | 403 fatal(); |
404 | 404 |
405 llvm::LLVMContext context; | 405 llvm::LLVMContext& context = llvm::getGlobalContext(); |
406 llvm::Module mod("dummy", context); | 406 llvm::Module mod("dummy", context); |
407 | 407 |
408 // override triple if needed | 408 // override triple if needed |
409 const char* defaultTriple = DEFAULT_TARGET_TRIPLE; | 409 const char* defaultTriple = DEFAULT_TARGET_TRIPLE; |
410 if ((sizeof(void*) == 4 && m64bits) || (sizeof(void*) == 8 && m32bits)) | 410 if ((sizeof(void*) == 4 && m64bits) || (sizeof(void*) == 8 && m32bits)) |