This is an archive of the discontinued LLVM Phabricator instance.

Migrate getOrCreateInternalVariable from Clang to OMPIRBuilder.
ClosedPublic

Authored by TIFitis on Nov 9 2022, 8:18 AM.

Details

Summary

This patch removes getOrCreateInternalVariable from Clang OMP CodeGen and replaces it's uses with

	 OMPBuilder::getOrCreateInternalVariable. Also refactors OMPBuilder::getOrCreateInternalVariable to change type of name
	 from Twine to StringRef

Diff Detail

Event Timeline

TIFitis created this revision.Nov 9 2022, 8:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 9 2022, 8:18 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
TIFitis requested review of this revision.Nov 9 2022, 8:18 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptNov 9 2022, 8:18 AM
TIFitis updated this revision to Diff 474284.Nov 9 2022, 8:20 AM

Fix commit message indentation.

shafik added a subscriber: shafik.Nov 10 2022, 8:58 PM
shafik added inline comments.
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
3980
jdoerfert accepted this revision.Nov 11 2022, 12:43 PM

LG, minor nits. Nice cleanup.

llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
1729

No llvm::. Can you check your future patches for these things, please.
StringRef is passed by value not reference.

This revision is now accepted and ready to land.Nov 11 2022, 12:43 PM
TIFitis updated this revision to Diff 475125.Nov 14 2022, 5:59 AM
TIFitis marked 2 inline comments as done.

Addressed comments.

TIFitis added inline comments.Nov 14 2022, 6:00 AM
llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
1729

Sure. The current code was inconsistent so I wasn't sure and went with the standard practice of explicitly describing namespace in header files and removed them from cpp files. I'll remove from both going forward :)