> Well, my idea is to propagate it out of TranslateArgs into the > callers. Doing that we reach cases where we have char* as keys in > densmaps, which is *really* scary and where I actually started looking > at this. > > I will just sent a larger patch to better illustrate the impact > tonight or tomorrow.
And this is it. This patch removes all the char* used to pass around
the "cpuarch" (armv7, pentium4, etc). I started looking at this when I
noticed:
llvm::DenseMap<std::pair<const ToolChain*, const char*>,
DerivedArgList*> TCArgs;
This only works because all the char* that are allowed to reach this
are "from" an ArgList, which requires using Args.MakeArgString is some
cases. A very subtle contract for a string that is created in one file
and used in another.
This also removes r600, nvptx, nvptx64, amdil and spir from the list
of values that can be used with -arch :-). Since the string was only
used much further inside the driver, they got added without anyone
noticing. We now have a switch over all the cases, adding something
will cause a warning.
Cheers,
Rafael
t.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
