This is an archive of the discontinued LLVM Phabricator instance.

merge two near-identical functions createPrivateGlobalForString into one
ClosedPublic

Authored by kcc on Oct 11 2018, 3:47 PM.

Details

Summary

We have two copies of createPrivateGlobalForString (in asan and in esan).
This change merges them into one. NFC

Diff Detail

Event Timeline

kcc created this revision.Oct 11 2018, 3:47 PM
vitalybuka accepted this revision.Oct 11 2018, 3:58 PM
vitalybuka added inline comments.
lib/Transforms/Instrumentation/Instrumentation.cpp
62
if (AllowMerging)
  GV->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
GV->setAlignment(1); // Strings may not be merged w/o setting align 1.
This revision is now accepted and ready to land.Oct 11 2018, 3:58 PM
This revision was automatically updated to reflect the committed changes.
kcc added inline comments.Oct 11 2018, 4:05 PM
lib/Transforms/Instrumentation/Instrumentation.cpp
62

done