Skip to content

Conversation

@eugeneepshteyn
Copy link
Contributor

Implement extended intrinsic PUTENV, both function and subroutine forms. Add PUTENV documentation to flang/docs/Intrinsics.md. Add functional and semantic unit tests.

	modified:   flang-rt/include/flang-rt/runtime/environment.h
	modified:   flang-rt/lib/runtime/environment.cpp
	modified:   flang-rt/include/flang-rt/runtime/environment.h
	modified:   flang-rt/lib/runtime/environment.cpp
	modified:   flang-rt/lib/runtime/command.cpp
	modified:   flang-rt/lib/runtime/environment.cpp
	modified:   flang/include/flang/Optimizer/Builder/IntrinsicCall.h
	modified:   flang/include/flang/Optimizer/Builder/Runtime/Command.h
	modified:   flang/include/flang/Runtime/command.h
	modified:   flang/lib/Evaluate/intrinsics.cpp
	modified:   flang/lib/Optimizer/Builder/IntrinsicCall.cpp
	modified:   flang/lib/Optimizer/Builder/Runtime/Command.cpp
	modified:   flang-rt/lib/runtime/command.cpp
	modified:   flang-rt/lib/runtime/environment.cpp
	modified:   flang/include/flang/Optimizer/Builder/IntrinsicCall.h
	modified:   flang/lib/Optimizer/Builder/IntrinsicCall.cpp
	modified:   flang/docs/Intrinsics.md
	new file:   test/Lower/Intrinsics/putenv-func.f90
	new file:   test/Lower/Intrinsics/putenv-sub.f90
	new file:   test/Semantics/putenv.f90
@github-actions
Copy link

github-actions bot commented Apr 4, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

std::int32_t UnsetEnv(
const char *name, std::size_t name_length,
const Terminator &terminator);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SetEnv() and UnsetEnv() could be used by the rest flang-rt, if necessary

Copy link
Contributor

@clementval clementval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lowering LGTM

@klausler
Copy link
Contributor

klausler commented Apr 4, 2025

Fix formatting and ship it; thank you!

@eugeneepshteyn eugeneepshteyn merged commit 61af05f into llvm:main Apr 4, 2025
12 checks passed
@eugeneepshteyn eugeneepshteyn deleted the putenv branch April 4, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants