clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.
Don't assert in ArchSpec::GetClangTargetCPU () and always call this function.
See inlined comments.
================
Comment at: source/Core/ArchSpec.cpp:558
@@ +557,3 @@
+ default:
+ assert(false && "unexpected core");
+ break;
----------------
I would remove the assert and let people opt into supplying a valid target CPU
for their architecture if they ever need to. We shouldn't crash.
================
Comment at:
source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp:240-246
@@ -233,1 +239,9 @@
+ if (target_machine == llvm::Triple::mips ||
+ target_machine == llvm::Triple::mipsel ||
+ target_machine == llvm::Triple::mips64 ||
+ target_machine == llvm::Triple::mips64el)
+ {
+ m_compiler->getTargetOpts().CPU = target_arch.GetClangTargetCPU();
+ }
+
----------------
If we remove the assert, can we just always assign this (remove the "if
(is_mips)")? Is the CPU string empty before this call all the time? If so
"ArchSpec::GetClangTargetCPU ()" can just return an empty string for any CPU
that doesn't really need to make a special CPU string..
Repository:
rL LLVM
http://reviews.llvm.org/D17022
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits