]> granicus.if.org Git - clang/commit
Switch the X86TargetInfo object from a string representation of the
authorChandler Carruth <chandlerc@gmail.com>
Wed, 28 Sep 2011 08:55:37 +0000 (08:55 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 28 Sep 2011 08:55:37 +0000 (08:55 +0000)
commitd9d3ddff44ca1502661f727dd91f64eb5823d647
treefb002ffda5013f657635ecadfd6197fbe46f40b7
parent499d972f08af0f1bffe30f253b24e66dfb0d4e02
Switch the X86TargetInfo object from a string representation of the
selected CPU model to the enumeration. This parses the string
representation once using a StringSwitch on SetCPU. It returns an error
for strings which are not recognized (yay!). Finally it replaces
ridiculous if-chains with switches that cover all enumerators.

The last change required adding several missing entries to the features
function. These were obvious on inspection. Yay for a pattern that gives
warnings when we miss one.

No new test cases yet, as I want to get the 64-bit errors working first.
I'll then start fleshing out the testing more. Currently I'm primarily
testing on Linux, but I'm hoping check whether there are interesting
differences on darwin before long...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140685 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/Targets.cpp