Skip to content

Conversation

@perry-ca
Copy link
Contributor

The commit a1935fd removed an include that is needed when building on z/OS.

@perry-ca perry-ca self-assigned this Apr 11, 2025
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Apr 11, 2025
@perry-ca perry-ca requested review from abhina-sree, redstar and rnk April 11, 2025 20:02
@llvmbot
Copy link
Member

llvmbot commented Apr 11, 2025

@llvm/pr-subscribers-clang

Author: Sean Perry (perry-ca)

Changes

The commit a1935fd removed an include that is needed when building on z/OS.


Full diff: https://github.com/llvm/llvm-project/pull/135430.diff

1 Files Affected:

  • (modified) clang/lib/Basic/SourceManager.cpp (+1)
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index a78ffc1e90ebe..6d6e54b1bec69 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -24,6 +24,7 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/Support/Allocator.h"
+#include "llvm/Support/AutoConvert.h"
 #include "llvm/Support/Capacity.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/Endian.h"

Copy link
Contributor

@abhina-sree abhina-sree left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@zibi2 zibi2 left a comment

Choose a reason for hiding this comment

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

LGTM

@rnk
Copy link
Collaborator

rnk commented Apr 13, 2025

I just happened to look into the implementation of AutoConvert.h, and I see the entire interface is defined away when not targeting zOS. This means that all call sites need to be conditional on ifdef __MVS__, which means we have ugly ifdef droppings all over the codebase, which harms readability and understandability.

Can whoever owns this redesign the header so that it provides inline functions which have default implementations that return false / no_error to disable their functionality on non-zOS platforms? Otherwise this failure mode will happen again in the future. This seems like feedback that should've come up in the original review (https://reviews.llvm.org/D100483), but I don't recognize enough of the contributor names there to confirm that there was some approval from maintainers or the broader community, it looks like this was mostly approved by zOS stakeholders.

@rnk rnk merged commit 84666d6 into llvm:main Apr 13, 2025
14 checks passed
@perry-ca
Copy link
Contributor Author

I just happened to look into the implementation of AutoConvert.h, and I see the entire interface is defined away when not targeting zOS. This means that all call sites need to be conditional on ifdef __MVS__, which means we have ugly ifdef droppings all over the codebase, which harms readability and understandability.

Can whoever owns this redesign the header so that it provides inline functions which have default implementations that return false / no_error to disable their functionality on non-zOS platforms? Otherwise this failure mode will happen again in the future. This seems like feedback that should've come up in the original review (https://reviews.llvm.org/D100483), but I don't recognize enough of the contributor names there to confirm that there was some approval from maintainers or the broader community, it looks like this was mostly approved by zOS stakeholders.

I had the same reflection. I'd get that change made. Thanks

@perry-ca perry-ca deleted the perry/add-back-hdr branch May 6, 2025 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants