[PATCH] [ARM] Keep track of previous changes to the bit pattern stored HW_FP

Ranjeet Singh ranjeet.singh at arm.com
Mon Jun 15 07:21:16 PDT 2015

The order that the features are specified on the cc1 command line won't mean that the features will be stored in the Features vector in the same order. This is because the features on the command line are parsed and stored into a StringMap then they're taken out again which can jumble up the order because StringMap's don't maintain order, below is the code which takes the features out of the StringMap in lib/Basic/Targets.cpp:

  7311:  Opts->Features.clear();
  7312:  for (llvm::StringMap<bool>::const_iterator it = Features.begin(),
  7313:         ie = Features.end(); it != ie; ++it)
  7314:    Opts->Features.push_back((it->second ? "+" : "-") + it->first().str());
  7315:  if (!Target->handleTargetFeatures(Opts->Features, Diags))
  7316:    return nullptr;
  7318:  return Target.release();

> You can use CHECK-DAG, which will match all strings in a list in any order

Can you explain in more detail how I can check for this internal bug using CHECK-DAG?




More information about the llvm-commits mailing list